/* ------------------------------------------ scss mixin ------------------------------------------ */

// 双向居中flex
@mixin display-flex {
  display: flex;
  justify-content: center;
  align-items: center;
}

// line-height与height相同
@mixin lineheight-height($line-height: 20px) {
  line-height: $line-height;
  height: $line-height;
}

// 一行超出显示...
@mixin overflow-emphasis {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

// 多行超出显示...
@mixin line-emphasis($lineCount: 1) {
  text-overflow: -o-ellipsis-lastline;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: $lineCount;
  -webkit-box-orient: vertical;
}

// 清除浮动
@mixin clearfix {
  &:before,
  &:after {
      content: "";
      display: table;
  }
  &:after {
      clear: both;
  }
}

// 居中块元素
@mixin center-block {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

// button样式清除
@mixin reset-button {
  padding: 0;
  border: none;
  font: inherit;
  color: inherit;
  background-color: transparent;
}

// input样式清除
@mixin reset-input {
  border: none;
  outline: none;
  text-decoration: none;
}